package cn.bugstack.mybatis.scripting;

import cn.bugstack.mybatis.executor.parameter.ParameterHandler;
import cn.bugstack.mybatis.mapping.BoundSql;
import cn.bugstack.mybatis.mapping.MappedStatement;
import cn.bugstack.mybatis.mapping.SqlSource;
import cn.bugstack.mybatis.session.Configuration;
import org.dom4j.Element;
/**
 * @author wcc
 * @description 脚本语言驱动器
 * @create
 */

public interface LanguageDriver {
    /**
     * 创建SQL源码 mapper XML方式
     * */
    SqlSource createSqlSource(Configuration configuration, Element script, Class<?> parameterType);
    /**
     * 创建SQL源码(annotation 注解方式)
     */
    SqlSource createSqlSource(Configuration configuration, String script, Class<?> parameterType);

    /**
     * 创建参数处理器
     * */
    ParameterHandler createParameterHandler(MappedStatement mappedStatement, Object parameterObject, BoundSql boundSql);

}
